package cn.edu.wfu.libautobook.bean;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

@JsonInclude(JsonInclude.Include.NON_NULL)
@TableName("wfu_shadule")
public class Schedule implements Serializable {
    @TableId(type = IdType.AUTO, value = "sid")
    Integer sid;

    User user;

    @TableField("user")
    Integer uid;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    Date time;

    Integer adjust;

    Integer enabled;

    Integer states;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    Date createTime;

    Integer seatId;

    Integer jid;

    Quartz quartz;

    public Schedule(Integer sid, User user, Date time, Integer adjust, Integer enabled, Integer states, Date createTime, Integer uid) {
        this.sid = sid;
        this.user = user;
        this.time = time;
        this.adjust = adjust;
        this.enabled = enabled;
        this.states = states;
        this.createTime = createTime;
        this.uid = uid;
    }

    public Schedule() {
    }

    public Integer getJid() {
        return jid;
    }

    public void setJid(Integer jid) {
        this.jid = jid;
    }

    public Integer getSeatId() {
        return seatId;
    }

    public void setSeatId(Integer seatId) {
        this.seatId = seatId;
    }

    public Integer getUid() {
        return uid;
    }

    public void setUid(Integer uid) {
        this.uid = uid;
    }

    public Integer getSid() {
        return sid;
    }

    public void setSid(Integer sid) {
        this.sid = sid;
    }

    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }

    public Date getTime() {
        return time;
    }

    public void setTime(Date time) {
        this.time = time;
    }

    public Integer getAdjust() {
        return adjust;
    }

    public void setAdjust(Integer adjust) {
        this.adjust = adjust;
    }

    public Integer getEnabled() {
        return enabled;
    }

    public void setEnabled(Integer enabled) {
        this.enabled = enabled;
    }

    public Integer getStates() {
        return states;
    }

    public void setStates(Integer states) {
        this.states = states;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Quartz getQuartz() {

        return quartz;
    }

    public void setQuartz(Quartz quartz) {
        this.quartz = quartz;
    }

    @Override
    public String toString() {
        return "Schedule{" +
                "sid=" + sid +
                ", user=" + user +
                ", uid=" + uid +
                ", time=" + time +
                ", adjust=" + adjust +
                ", enabled=" + enabled +
                ", states=" + states +
                ", createTime=" + createTime +
                ", seatId=" + seatId +
                ", jid=" + jid +
                ", quartz=" + quartz +
                '}';
    }
}
